import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'home',
  templateUrl: './home.component.html',
  styleUrls: ['./home.component.css']
})
export class HomeComponent implements OnInit {

  menus = [
    {
      name: '设备点检',
      icon: 'anticon-clock-circle-o',
      submenus: [
        {name: '点检项目', url: '/home/equip/checkItem'},
        {name: '点检记录', url: '/home/equip/checkRecord'},
        {name: '点检详情', url: '/home/equip/checkDetail'}
      ]
    },
    {
      name: '设备维修',
      icon: 'anticon-tool',
      submenus: [
        {name: '维修记录'}
      ]
    }
  ]

  constructor() { }

  ngOnInit() {
  }

  styleMethod(iconClass: string) {
    const style = {
      "anticon": true
    }
    style[iconClass] = true;
    return  style;
  }

}
